<?php
$idAnuncio=$_GET['excluirIdAnuncio'];

if ( !( $database = mysql_connect( "localhost", "root", "" ) ) )
	die( "Could not connect to database </body></html>" );
	
	// open Products database
	if ( !mysql_select_db( "ache_classificados", $database ) )
	die( "Could not open database </body></html>" );

	// build SELECT query
	$query = "DELETE FROM anuncio_tb WHERE id = $idAnuncio";

	// query Products database
	if ( !( $result = mysql_query( $query, $database ) ) )
	{
		print( "Could not execute query! <br />" );
		die( mysql_error() . "</body></html>" );
	} // end if
	//echo $result;
	mysql_close( $database );

?>